<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <title>会员中心</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .div_group {
            float: left;
            width: 30%;
            height: 18em;
        }
        .div_group-b img {
            width: 50%;
        }
        #head {
            background-color: #445b8b;
            background-image: url("img/user-head.png");
            width: 100%;
            height: 18em;
            color: #fff;
            background-size: 100% 100%;
        }
        #activity {
            width: 100%;
            height: 4.7em;
            box-shadow: 0 0 7px #c8c8c8;
            border-radius: 5px;
        }
        .activity-bean{
            width: 33.3%;
            height: 4.7em;
            float: left;
            text-align: center;
            padding-top: 4%;
        }
        .activity-bean img{
            width: 30%;
            height: 38%;
        }
        .activity-bean div{
            font-size: 0.7em;
            margin-top: 2%;
            color: #6d6868;
        }
        .fun{
            width: 100%;

            box-shadow: 0 0 7px #c8c8c8;
            border-radius: 5px;

        }
        .fun-bean{
            padding: 0 5%;
            height: 2.8em;
            line-height: 2.8em;
            font-size: 0.9em;
        }
        .fun-bean div{
         border-bottom: #bebdbd solid 1px;
        }
        .fun-bean img{
            width: 5%;
        }

    </style>
</head>
<body>
<div id="head">
    <div class="div_group" style="width: 30%;">
        <img id="img" src="img/123.png" style="width: 50%;border-radius:50%;margin-top: 3.4em;margin-left: 25%;">
    </div>

    <div class="div_group" style="width: 40%;">
        <div style="font-size: 1em;margin: 5.4em 0 15% 0;" id="name">会员名:</div>
        <div style="font-size: 12px;" id="in">积分余额: 0</div>
        <div style="font-size: 12px;margin-top: 10px" id="pr">账户余额: 0</div>
    </div>

    <div class="div_group" style="width: 30%">
        <div style="margin-top: 80%;margin-left: 2%;">
            <span style="background-color: #7e95c4;padding: 3% 13%;border-radius: 18px;font-size: 13px;" id="type">
                积分卡
            </span></div>
    </div>
</div>
<div style="margin: 4%">
    <div id="activity">
        <div class="activity-bean" id="jfdh">
            <img src="img/acv3.png">
            <div>积分兑礼</div>
        </div>
        <div class="activity-bean" id="yhj">
            <img src="img/acv2.png">
            <div>优惠券</div>
        </div>
        <div class="activity-bean" id="tt">
            <img src="img/acv1.png">
            <div>消息中心</div>
        </div>
    </div>
</div>
<div style="margin: 4%">
  <div class="fun">
      <div style="background-color: #c1c1c1;border-radius: 5px 5px 0 0;">
          <div class="fun-bean">
              <span style="font-size: 1.1em">个人中心</span>
          </div>
      </div>
      <div class="fun-bean"  id="div-item">
          <div>
              <img src="img/i-1.png">
              <span>会员资料</span>
              <img src="img/i-b.png" style="width: 2.6%;margin-top: 0.7em;float: right;">
          </div>
      </div>
      <div class="fun-bean" id="integral">
          <div>
              <img src="img/i-2.png">
              <span>积分明细</span>
              <img src="img/i-b.png" style="width: 2.6%;margin-top: 0.7em;float: right;">
          </div>
      </div>
      <div class="fun-bean" id="price">
          <div>
              <img src="img/i-3.png">
              <span>充值明细</span>
              <img src="img/i-b.png" style="width: 2.6%;margin-top: 0.7em;float: right;">
          </div>
      </div>
      <div class="fun-bean" id="record">
          <div>
              <img src="img/i-3.png">
              <span>消费记录</span>
              <img src="img/i-b.png" style="width: 2.6%;margin-top: 0.7em;float: right;">
          </div>
      </div>
      <div class="fun-bean" id="div-action">
          <div>
              <img src="img/i-4.png">
              <span>我的任务</span>
              <img src="img/i-b.png" style="width: 2.6%;margin-top: 0.7em;float: right;">
          </div>
      </div>
      <div class="fun-bean" id="div-store">
          <div style="border: 0">
              <img src="img/i-5.png">
              <span>附近门店</span>
              <img src="img/i-b.png" style="width: 2.6%;margin-top: 0.7em;float: right;">
          </div>
      </div>
  </div>
</div>

</body>
<script src="js/jquery.min.js"></script>
<script src="js/alert.js"></script>
<script>

    $(document).ready(function () {
        $.ajax({
            "url": "/vip/getuser/",
            "type": "POST",
            "dataType": "json",
            "success": function (json) {
                var data = json.data;
                $("#img").attr('src', data.img);
                $("#name").html("会员名：" + data.name);
                $("#in").html("积分余额：" + data.integral);
                $("#pr").html("账户余额：" + data.price);
                $("#type").html(data.type);
            }
        })
    });


    $("#yhj").click(function () {
        location.href = "user-coupon.html";
    });

    $("#div-item").click(function () {
        location.href = "user-item.html";
    });

    $("#div-store").click(function () {
        location.href = "user-store.html";
    });

    $("#div-action").click(function () {
        location.href = "user-complement.html";
    });
    $("#jfdh").click(function () {
        location.href = "conversion.html";
    });
    $("#integral").click(function () {
        location.href = "vip-recharge-i.html";
    });
    $("#price").click(function () {
        location.href = "vip-recharge-p.html";
    });
    $("#record").click(function () {
        location.href = "vip-retail.html";
    });
/**************************************************/
    $("#tt").click(function () {
        location.href = "thanks.html";
    });
</script>
<!--禁止页面回退-->
<script language="javascript">
    //防止页面后退
    history.pushState(null, null, document.URL);
    window.addEventListener('popstate', function () {
        history.pushState(null, null, document.URL);
    });
</script>
<script>

    window.addEventListener('pageshow', function (event) {

        if (event.persisted|| window.performance &&

            window.performance.navigation.type == 2){

            $.ajax({
                "url": "/vip/getuser/",
                "type": "POST",
                "dataType": "json",
                "success": function (json) {
                    var data = json.data;
                    $("#img").attr('src', data.img);
                    $("#name").html("会员名：" + data.name);
                    $("#in").html("积分余额：" + data.integral);
                    $("#pr").html("账户余额：" + data.price);
                    $("#type").html(data.type);
                }
            })
        }

    });

</script>
</html>